﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
                    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
                    xmlns:resources="clr-namespace:WirelessAccessPoint.Resources"
                    xmlns:model="clr-namespace:WirelessAccessPoint">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Style/CellStyle.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <DataTemplate x:Key="StatusHostedNetworkPeersTemplate" DataType="{x:Type model:WirelessAccessPointViewModel}">
        <ListBox ItemsSource="{Binding HostedNetworkPeers}">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <Image Style="{StaticResource PeerImageStyle}" />
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>

                            <Label Grid.Row="0"
                                   Grid.Column="0"
                                   Content="{x:Static resources:LabelResource.PeerMacAddressLabel}"
                                   Foreground="{StaticResource CellImageTitleForegroundBrush}"
                                   Style="{StaticResource PeerLabelStyle}" />
                            <Label Grid.Row="0"
                                   Grid.Column="1"
                                   Content="{Binding PeerMacAddress}"
                                   Style="{StaticResource PeerLabelStyle}" />

                            <Label Grid.Row="1"
                                   Grid.Column="0"
                                   Content="{x:Static resources:LabelResource.PeerIPAddressLabel}"
                                   Foreground="{StaticResource CellImageTitleForegroundBrush}"
                                   Style="{StaticResource PeerLabelStyle}" />
                            <Label Grid.Row="1"
                                   Grid.Column="1"
                                   Content="{Binding PeerIPAddressString}"
                                   Style="{StaticResource PeerLabelStyle}" />
                            
                            <Label Grid.Row="2"
                                   Grid.Column="0"
                                   Content="{x:Static resources:LabelResource.PeerAuthenticationLabel}"
                                   Foreground="{StaticResource CellImageTitleForegroundBrush}"
                                   Style="{StaticResource PeerLabelStyle}" />
                            <Label Grid.Row="2"
                                   Grid.Column="1"
                                   Content="{Binding PeerAuthStateString}"
                                   Style="{StaticResource PeerLabelStyle}" />
                        </Grid>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </DataTemplate>

</ResourceDictionary>
